package cn.com.oidreams.wechat.robot.entity;

import cn.com.oidreams.common.annotations.Required;
import cn.com.oidreams.wechat.robot.enums.WeXinTalkEnum;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/***
 ** @category 请用一句话描述这个类的用途
 ** @author qing.yunhui
 ** @email: qingyh@glodon.com
 ** @createTime: 2021-12-14 20:00
 **/
@Data
public class MarkDownMsgRequest extends BaseRequest {

    public MarkDownMsgRequest(Markdown markdown) {
        super.setMsgtype(WeXinTalkEnum.MSG_TYPE.MARKDOWN.getCode());
        this.markdown = markdown;
    }

    @Required(errorMsg = "markdown必填",classParse = true)
    private Markdown markdown;

    @Getter
    @Setter
    public static class Markdown {
        @Required(errorMsg = "markdown内容必填",remark = "markdown内容，最长不超过4096个字节，必须是utf8编码")
        private String content;
        public Markdown(String content) {
            this.content = content;
        }
    }
}
